//
//  HWTrumpetManagementViewController.m
//  HWanGame
//
//  Created by 陈道斌 on 2019/10/25.
//  Copyright © 2019 Chendaobin. All rights reserved.
//

#import "HWTrumpetManagementViewController.h"

@interface HWTrumpetManagementViewController ()<UITextFieldDelegate>
@property(strong,nonatomic) UITextField *searchTextField;
@property(strong,nonatomic) UIImageView *icoImageView;
@property(strong,nonatomic) UILabel *nameLabel;


@end

@implementation HWTrumpetManagementViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
   // [self setupUI];
    
   [self noResultsearch];
    
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"小号管理";
    
}

// 设置UI
- (void)setupUI {
    
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"小号管理";
    
    
    
    UITextField *texfeild = [[UITextField alloc]initWithFrame:CGRectMake(32, NavBarHeight+15, kScreenW-64, 30)];
    
    //    texfeild.layer.borderColor  = RGB(208, 208, 208).CGColor;
    //    texfeild.layer.borderWidth = 0.5;
    texfeild.font = [UIFont systemFontOfSize:12];
    UIButton *button =  [UIButton buttonWithType:UIButtonTypeCustom];
   // button.backgroundColor = [UIColor redColor];
    button.frame = CGRectMake(5, 0, 35, 30);
    [button setImage:[UIImage imageNamed:@"sousukuananniu_ico"] forState:UIControlStateNormal];
    [button setImage:[UIImage imageNamed:@"sousukuananniu_ico"] forState:UIControlStateHighlighted];
    UIView *leftview = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 35, 30)];
   // leftview.backgroundColor = [UIColor redColor];
    [leftview addSubview:button];
    
    
    texfeild.leftView = leftview;
    texfeild.leftViewMode = UITextFieldViewModeAlways;
    
    texfeild.returnKeyType =UIReturnKeySearch;
    texfeild.delegate = self;
    texfeild.placeholder = @"请输入游戏名称";
    
    texfeild.layer.cornerRadius = 15;
    texfeild.layer.masksToBounds = YES;
    texfeild.backgroundColor = RGB(245, 245, 245);
   // texfeild.backgroundColor = [UIColor whiteColor];
    //   [texfeild becomeFirstResponder];
    [self.view  addSubview:texfeild];
    self.searchTextField = texfeild;
    
    
}

//搜索结果
- (void)noResultsearch {
    
    
    self.icoImageView = [[UIImageView alloc]initWithFrame:CGRectMake((kScreenW-190)/2, (kScreenH-100)/2-64+20, 190, 100)];
    self.icoImageView.image = [UIImage imageNamed:@"state_no"];
    [self.view addSubview:self.icoImageView];
   
    self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, self.icoImageView.bottom+5, kScreenW, 20)];
    self.nameLabel.text = @"暂时没有小号，快去下载吧！";
    self.nameLabel.textAlignment = NSTextAlignmentCenter;
    self.nameLabel.textColor = RGB(153, 153, 153);
    self.nameLabel.font = [UIFont systemFontOfSize:14];
    [self.view addSubview:self.nameLabel];
    
    
    
}



@end
